import http from "./http.js";


//查询学生信息（学生角色）
export function getStudentInfo(data) {
	return http.request({
			url: `/student/getStudentInfo`,
			method: "get",
		},
		data,
		false
	);
}

//查询第一个家长信息
export function getFirstParentsInfo(data) {
	return http.request({
			url: `/student/getFirstParentsInfo`,
			method: "get",
		},
		data,
		false
	);
}


//查询其他家长信息
export function getAnotherParentsInfo(data) {
	return http.request({
			url: `/student/getAnotherParentsInfo`,
			method: "get",
		},
		data,
		false
	);
}

//新增其他家长
export function insertAnotherParents(data) {
	return http.request({
			url: `/student/insertAnotherParents`,
			method: "post",
		},
		data,
		true
	);
}

//查询其他学生信息
export function getAnotherStudentInfo(data) {
	return http.request({
			url: `/student/getAnotherStudentInfo`,
			method: "get",
		},
		data,
		true
	);
}

//新增其他学生
export function insertAnotherStudent(data) {
	return http.request({
			url: `/student/insertAnotherStudent`,
			method: "post",
		},
		data,
		true
	);
}

// 切换其他学生-查询学生列表
export function qryBindStudents(data) {
	return http.request({
			url: `/student/qryBindStudents`,
			method: "get",
		},
		data,
		true
	);
}


//切换其他学生（学生角色）
export function changeStudent(data) {
	return http.request({
			url: `/student/changeStudent?studentId=${data.studentId}`,
			method: "post",
		},
		data,
		true
	);
}

//常用设备列表
export function qryOnlineDevices(data) {
	return http.request({
			url: `/student/qryOnlineDevices`,
			method: "get",
		},
		data,
		true
	);
}

//删除登录设备
export function removeOnlineDevices(data) {
	return http.request({
			url: `/student/removeOnlineDevices/${data.id}`,
			method: "delete",
		},
		data,
		true
	);
}

//退出登录
export function logout(data) {
	return http.request({
			url: `/logout`,
			method: "get",
		},
		data,
		true
	);
}

//查询家长信息（家长角色）
export function getParentsInfo(data) {
	return http.request({
			url: `/student/getParentsInfo`,
			method: "get",
		},
		data,
		false
	);
}


// 查询当前学生的学习进度（学生角色）
export function qryCurrentStuProgress(data) {
	return http.request({
			url: `/student/qryCurrentStuProgress`,
			method: "get",
		},
		data,
		false
	);
}


// 查询章节列表（学生角色）（我的课程 / 学习进度） 
export function qryChapterList(data) {
	return http.request({
			url: `/student/qryChapterList`,
			method: "get",
		},
		data,
		false
	);
}

// 查询所有学生的学习进度（家长角色）
export function qryAllStuProgress(data) {
	return http.request({
			url: `/student/qryAllStuProgress`,
			method: "get",
		},
		data,
		false
	);
}

// 查询某学生的学习进度（家长角色）
export function qryProgressByStudent(data) {
	return http.request({
			url: `/student/qryProgressByStudent/${data.studentId}`,
			method: "get",
		},
		data,
		false
	);
}

// 切换当前学生（家长角色）
export function changeCurrentStudent(data) {
	return http.request({
			url: `/student/changeCurrentStudent?studentId=${data.studentId}`,
			method: "post",
		},
		data,
		false
	);
}


//修改手机号
export function changePhone(data) {
	return http.request({
			url: `/student/changePhone`,
			method: "post",
		},
		data,
		false
	);
}


//查询某个学生的年级列表
export function gryGradeByStudent(data) {
	return http.request({
			url: `/student/qryGradeByStudent/${data.studentld}`,
			method: "get",
		},
		// data,
		false
	);
}